package com.example.studyPlatform.controller.api.protocol;

import com.fasterxml.jackson.databind.ObjectMapper;

public enum API_STATE {
    SUCCESS("api调用成功"),
    CLIENT_ERR(499,"客户端错误"),
    SERVER_ERR(599,"服务器错误")


    ;

    final public int code;
    final public String message;
    private API_STATE (String message) {
        code=200;
        this.message=message;
    }
    private API_STATE (int code,String message) {
        this.code=code;
        this.message=message;
    }

    void toJson(){
        ObjectMapper objectMapper = new ObjectMapper();
    }
}
